package com.heer.gymnasium.module.fellow.beans;

import com.heer.gymnasium.module.main.beans.FellowListResponseBean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by zy on 2018/3/16.
 */

public class MatchBean {
    private ArrayList<MatchResponseBean.Item> data;

    public ArrayList<MatchResponseBean.Item> getData() {
        return data;
    }

    public void setData(ArrayList<MatchResponseBean.Item> data) {
        this.data = data;
    }

    public static Collection<? extends Item> dataChange(List<FellowListResponseBean.Item> data) {
        ArrayList<Item> arrayList = new ArrayList<>();
        for (FellowListResponseBean.Item item : data) {
            Item newItem = new Item();
            newItem.setCorps_id(item.getCorps_id());
            newItem.setCorps_name(item.getCorps_name());
            newItem.setEtime(item.getStime());
            newItem.setOrder_id(item.getOrder_id());
            newItem.setPay_money(item.getPrice());
            newItem.setPlace_name(item.getAddress());
            newItem.setStadiumname(item.getStadium_name());
            newItem.setStime(item.getStime());
            FellowListResponseBean.CorpsTag corpsTag = item.getCorps_tag();
            if (corpsTag != null) {
                newItem.setTag_me(corpsTag.getTag_me());
                newItem.setTag_other(corpsTag.getTag_other());
            }
            newItem.setCategoryIcon(item.getCategory_icon());
            newItem.setTotalNum(item.getOrder_num());
            newItem.setCurrentNum(item.getOrder_num_a());
            newItem.setCorps_icon(item.getCorps_logo());
            newItem.setCorps_grade(item.getCorps_grade());
            arrayList.add(newItem);
        }
        return arrayList;
    }

    public static Info dataChane(MatchResponseBean.Info oldData) {
        Info info = new Info();
        info.setAddress(oldData.getAddress());
        info.setCorps_id(oldData.getCorps_id());
        info.setCorps_name(oldData.getCorps_name());
        info.setIs_member(oldData.getIs_member());
        info.setPhone(oldData.getPhone());
        info.setInfo(oldData.getInfo());
        info.setPlace(oldData.getPlace());
        info.setPrice(oldData.getPrice());
        info.setOrder_id(oldData.getOrder_id());
        info.setTime(oldData.getTime());
        info.setTime_day(oldData.getTime_day());
        info.setCorps_logo(oldData.getCorps_logo());
        info.setStadium_pic(oldData.getStadium_pic());
        info.setOrder_num(oldData.getOrder_num());
        info.setOrder_num_a(oldData.getOrder_num_a());
        info.setCategory_icon(oldData.getCategory_icon());
        return info;
    }


    public static class Info implements Serializable {

        private String order_id;
        private String time_day;
        private String price;
        private String address;
        private String corps_name;
        private String corps_id;
        private String info;
        private String phone;
        private String is_member;
        private List<String> time;
        private List<String> place;
        private String corps_logo;
        private String stadium_pic;
        private String order_num;
        private String order_num_a;
        private String category_icon;

        public String getOrder_id() {
            return order_id;
        }

        public void setOrder_id(String order_id) {
            this.order_id = order_id;
        }

        public String getTime_day() {
            return time_day;
        }

        public void setTime_day(String time_day) {
            this.time_day = time_day;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getCorps_name() {
            return corps_name;
        }

        public void setCorps_name(String corps_name) {
            this.corps_name = corps_name;
        }

        public String getCorps_id() {
            return corps_id;
        }

        public void setCorps_id(String corps_id) {
            this.corps_id = corps_id;
        }

        public String getInfo() {
            return info;
        }

        public void setInfo(String info) {
            this.info = info;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getIs_member() {
            return is_member;
        }

        public void setIs_member(String is_member) {
            this.is_member = is_member;
        }

        public List<String> getTime() {
            return time;
        }

        public void setTime(List<String> time) {
            this.time = time;
        }

        public List<String> getPlace() {
            return place;
        }

        public void setPlace(List<String> place) {
            this.place = place;
        }

        public String getCorps_logo() {
            return corps_logo;
        }

        public void setCorps_logo(String corps_logo) {
            this.corps_logo = corps_logo;
        }

        public String getStadium_pic() {
            return stadium_pic;
        }

        public void setStadium_pic(String stadium_pic) {
            this.stadium_pic = stadium_pic;
        }

        public String getOrder_num() {
            return order_num;
        }

        public void setOrder_num(String order_num) {
            this.order_num = order_num;
        }

        public String getOrder_num_a() {
            return order_num_a;
        }

        public void setOrder_num_a(String order_num_a) {
            this.order_num_a = order_num_a;
        }

        public String getCategory_icon() {
            return category_icon;
        }

        public void setCategory_icon(String category_icon) {
            this.category_icon = category_icon;
        }
    }


    public static class Item {
        private String order_id;
        private String corps_id;
        private String pay_money;
        private String stime;
        private String etime;
        private String place_name;
        private String corps_name;
        private String stadiumname;
        private ArrayList<String> tag_me;
        private ArrayList<String> tag_other;
        private String categoryIcon;
        private String totalNum;
        private String currentNum;
        private String corps_icon;
        private String corps_grade;

        public String getOrder_id() {
            return order_id;
        }

        public void setOrder_id(String order_id) {
            this.order_id = order_id;
        }

        public String getCorps_id() {
            return corps_id;
        }

        public void setCorps_id(String corps_id) {
            this.corps_id = corps_id;
        }

        public String getPay_money() {
            return pay_money;
        }

        public void setPay_money(String pay_money) {
            this.pay_money = pay_money;
        }

        public String getStime() {
            return stime;
        }

        public void setStime(String stime) {
            this.stime = stime;
        }

        public String getEtime() {
            return etime;
        }

        public void setEtime(String etime) {
            this.etime = etime;
        }

        public String getPlace_name() {
            return place_name;
        }

        public void setPlace_name(String place_name) {
            this.place_name = place_name;
        }

        public String getCorps_name() {
            return corps_name;
        }

        public void setCorps_name(String corps_name) {
            this.corps_name = corps_name;
        }

        public String getStadiumname() {
            return stadiumname;
        }

        public void setStadiumname(String stadiumname) {
            this.stadiumname = stadiumname;
        }

        public ArrayList<String> getTag_me() {
            return tag_me;
        }

        public void setTag_me(ArrayList<String> tag_me) {
            this.tag_me = tag_me;
        }

        public ArrayList<String> getTag_other() {
            return tag_other;
        }

        public void setTag_other(ArrayList<String> tag_other) {
            this.tag_other = tag_other;
        }

        public String getCategoryIcon() {
            return categoryIcon;
        }

        public void setCategoryIcon(String categoryIcon) {
            this.categoryIcon = categoryIcon;
        }

        public String getTotalNum() {
            return totalNum;
        }

        public void setTotalNum(String totalNum) {
            this.totalNum = totalNum;
        }

        public String getCurrentNum() {
            return currentNum;
        }

        public void setCurrentNum(String currentNum) {
            this.currentNum = currentNum;
        }

        public String getCorps_icon() {
            return corps_icon;
        }

        public void setCorps_icon(String corps_icon) {
            this.corps_icon = corps_icon;
        }

        public String getCorps_grade() {
            return corps_grade;
        }

        public void setCorps_grade(String corps_grade) {
            this.corps_grade = corps_grade;
        }
    }
}
